package com.whut.controller;

import com.whut.service.FileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;


/**
*   文件接收接口
* @author fuzhenjie
* @date 19.8.2 16:05
*/
@Controller
@RequestMapping("/fileReceiver")
@Scope("prototype")
public class FileReceiverController {

    @Autowired
    FileService fileService;

    @ResponseBody
    @PostMapping("/addSingleCheck")
    public Object addSingleCheck(String params, List<MultipartFile> files){
        return fileService.addResultSingleChild(params,files);
    }
}
